﻿<%@ Page Language="C#" MasterPageFile="~/Admin/Admin.master" AutoEventWireup="true"
    CodeFile="Tintuc.aspx.cs" Inherits="Admin_Tintuc" Title="Quản lý tin tức" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<%@ Register Assembly="FredCK.FCKeditorV2" Namespace="FredCK.FCKeditorV2" TagPrefix="FCKeditorV2" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
    <link rel="Stylesheet" href="/Online/CSS/Admin.css" type="text/css" />
    <style type="text/css">
        #pnNhap
        {
            margin-top: 10px;
        }
        .GV
        {
            color: White;
            font-size: 17px;
        }
        .GV1
        {
            border: 1px solid #333;
            border-left-style: hidden;
            border-right-style: hidden;
        }
        .file
        {
            color: White;
        }
        .cantrai
        {
            text-align: right;
            float: left;
            width: 500px;
            color: White;
            font-size: 17px;
        }
        .canphai
        {
            text-align: left;
            float: left;
            width: 500px;
            color: White;
            font-size: 17px;
        }
        .Hyperlink
        {
            color: White;
            text-decoration: none;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <div class="tieude">
        QUẢN LÝ TIN TỨC</div>
    <div style="height: auto;">
        <asp:GridView ID="GVTT" runat="server" AllowPaging="True" AutoGenerateColumns="False"
            DataKeyNames="Matin" CssClass="GV1" PageSize="10" Width="100%" PagerStyle-CssClass="GV"
            PagerStyle-ForeColor="White">
            <Columns>
                <asp:TemplateField HeaderText="Xóa" ItemStyle-HorizontalAlign="Center" ItemStyle-ForeColor="White"
                    ItemStyle-Width="50px" HeaderStyle-HorizontalAlign="Center" HeaderStyle-ForeColor="White">
                    <ItemTemplate>
                        <asp:CheckBox ID="ckq1" runat="server" />
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="ID" Visible="false">
                    <ItemTemplate>
                        <asp:Label ID="Ma" runat="server" Text='<%#Eval("Matin") %>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Tiêu đề" ItemStyle-HorizontalAlign="Left" ItemStyle-ForeColor="White"
                    HeaderStyle-HorizontalAlign="Center" HeaderStyle-ForeColor="White">
                    <ItemTemplate>
                        <asp:HyperLink ID="hpten" runat="server" Text='<%#Eval("Tieude") %>' NavigateUrl='<%#"/Online/Admin/Tintuc.aspx?"+"m="+Eval("Matin") %>'
                            CssClass="Hyperlink"></asp:HyperLink>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:BoundField DataField="Taikhoan" HeaderText="Người đăng" SortExpression="Taikhoan"
                    ItemStyle-HorizontalAlign="Center" ItemStyle-ForeColor="White" HeaderStyle-HorizontalAlign="Center"
                    HeaderStyle-ForeColor="White" />
                <asp:TemplateField HeaderText="Ngày đăng" ItemStyle-HorizontalAlign="Center" ItemStyle-ForeColor="White"
                    ItemStyle-Width="200px" HeaderStyle-HorizontalAlign="Center" HeaderStyle-ForeColor="White">
                    <ItemTemplate>
                        <asp:Label ID="ngaydang" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "Ngaydang", "{0:dd/MM/yyyy}")%> '></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:BoundField DataField="Hienthi" HeaderText="Hiển thị" ItemStyle-HorizontalAlign="Center"
                    ItemStyle-ForeColor="White" ItemStyle-Width="100px" HeaderStyle-HorizontalAlign="Center"
                    HeaderStyle-ForeColor="White" />
            </Columns>
        </asp:GridView>
        <div id="pnNhap" style="height: auto;">
            <table cellpadding="0" style="color: White; font-size: 17px;" cellspacing="0" border="1"
                class="GV1" width="100%">
                <tr>
                    <td style="text-align: center;" width="100px">
                        Tiêu đề:
                    </td>
                    <td>
                        <asp:TextBox ID="txttd" runat="server" Width="924"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td style="text-align: center;" width="100px">
                        Tóm tắt:
                    </td>
                    <td>
                        <asp:TextBox ID="txttt" runat="server" TextMode="MultiLine" Height="52px" Width="924px"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td style="text-align: center;" width="100px">
                        Nội dung:
                    </td>
                    <td>
                        <FCKeditorV2:FCKeditor ID="fcknd" Height="800px" SkinPath="skins/office2003/" ToolbarSet="Default"
                            runat="server" BasePath="~/fckeditor/">
                        </FCKeditorV2:FCKeditor>
                    </td>
                </tr>
                <tr>
                    <td style="text-align: center;" width="100px">
                        Hiển thị:
                    </td>
                    <td>
                        <asp:RadioButton ID="ht" runat="server" GroupName="ht" Text="Có" Checked="true" />
                        <asp:RadioButton ID="kht" runat="server" GroupName="ht" Text="Không" />
                    </td>
                </tr>
                <tr>
                    <td style="text-align: center;" width="100px">
                        Ảnh đại diện:
                    </td>
                    <td>
                        <asp:FileUpload ID="file" runat="server" CssClass="file" />
                        <asp:CheckBox ID="ckanh" runat="server" Text="Thay ảnh" Checked="false" />
                    </td>
                </tr>
                <tr>
                    <td>
                    </td>
                    <td>
                        <asp:Button ID="btnThem" runat="server" Width="80px" Text="Thêm" OnClick="btnThem_Click" />
                        <asp:Button ID="btnSua" runat="server" Width="80px" Text="Sửa" OnClick="btnSua_Click" />
                        <asp:Button ID="btnXoa" runat="server" Text="Xóa" Width="80px" OnClick="btnXoa_Click" />
                        <asp:Button ID="btnHuy" runat="server" Text="Hủy" Width="80px" OnClick="btnHuy_Click" />
                    </td>
                </tr>
            </table>
        </div>
        <div style="color: White; width: 96%; float: left; text-align: center; font-style: italic;
            margin: 20px;">
            <asp:Label ID="tb" runat="server"></asp:Label><br />
        </div>
    </div>
</asp:Content>
